<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>

<%@ page import="com.easyui.common.UserLogin" %>

<%
	String sno = request.getParameter("sno");
%>


<script>
	var partakeProjectDatagrid;
	$(function(){
		partakeProjectDatagrid = $('#partakeProjectDatagrid').datagrid({
			url:'servlet/ShowSProjectServlet?sno=' + <%= sno %>,
			//iconCls:'icon-save',
			fitColumns:true,
			nowrap:false,
			idField:'pno',
			rownumbers:true,
			pagination:false,
			fit:true,
			border:false,
			sortName:'pno',
			sortOrder:'desc',
			columns:[[ {
				title:'项目编号',
				field:'pno',
				sortable:true,
				hidden:true
			},{
				title:'项目名称',
				field:'pname',
				width:80
			},{
				title:'发布者',
				field:'pubname',
				width:50
			},{
				title:'进度',
				field:'progress',
				width:50,
				formatter: function(value,rowData,rowIndex){
					if(value == '1') {
						return '已完成';
					} else {
						return '进行中';
					}
		     	} 
			},{
				title:'阶段',
				field:'stage',
				width:50,
				formatter: function(value,rowData,rowIndex){
					if(value == 'todo') {
						return '待接受';
					} else if(value == 'doing') {
						return '进行中';
					} else {
						return '已完成';
					}
		     	}
			}]]
		});
		
	});

</script>


<table id="partakeProjectDatagrid"></table>
